package fr.umlv.m2.jee.spij.service.ldap.authentification;

import org.springframework.binding.message.MessageContext;

import javax.naming.NamingException;
import java.util.List;

/**
 * Provides methods to retrieve Actors into LDAP.
 *
 * @author lounes akroune
 */
public interface IDefaultActorService {

    /**
     * Returns an object Actor corresponding to login and password.
     *
     * @param dActor the actor to display.
     *
     * @return an actor.
     *
     * @throws NamingException exception.
     */
    DisplayActor getCurrentUserDetails(DisplayActor dActor)
            throws NamingException;

    /**
     * Returns all student user in LDAP.
     *
     * @param context the message context.
     *
     * @return a list of display actor.
     *
     * @throws NamingException if an error occured during ldap connection.
     */
    List<DisplayActor> getAllStudent(MessageContext context)
            throws NamingException;

    /**
     * Returns all teacher user in LDAP.
     *
     * @param context the message context.
     *
     * @return a list of actor.
     *
     * @throws NamingException if an error occured during ldap connection.
     */
    List<DisplayActor> getAllTeacher(MessageContext context)
            throws NamingException;

}
